﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MF.EFRepository;
using MF.Services;
using MF.ServiceModel;
using MF.Data;
using MF.Data.Entity;
using MF.EFRepository.Entities;
using MF.Repository;
using MF.EFRepository.Repository;

namespace MF.EFRepository
{
    class Program
    {
        static void Main(string[] args)
        {
            //unity wiring
            var container = IoC.Current.Container;
            container.RegisterType(typeof(IRepository<>), typeof(EntityRepository<>)); //generic repository
            container.RegisterType<IOrderRepository, OrderRepository>(); //specific repository
            container.RegisterType<IDbContextManager, WcfDbContextManager<MFEntitiesContainer>>();

            var host = new IoCServiceHost(typeof(OrderService));
            host.Open();
            //wait for calls...
            host.Close();

        }
    }
}
